package cn.hackcloud.designpattern.adapter;

public class Phone {
	public void charging(IVoltage5V iVoltage5V) {
		int output5v = iVoltage5V.output5V();
		if (output5v == 5) {
			System.out.println("可以充电了");
		} else {
			System.out.println("电压不匹配不能充电！");
		}
	}
}
